home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 426-450 / disk_436 / keymacro / mrarpfile.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  1KB  |  42 lines

  1. /*  MRARPFile.h
  2.  *  Definitions for ARP extended file support.
  3.  *  Author: Mark R. Rinfret
  4.  */
  5.  
  6. #ifndef MRARPFILE_H
  7. #define MRARPFILE_H
  8.  
  9. #include <libraries/arpbase.h>
  10.  
  11. typedef struct
  12. {
  13.     BPTR             fh;        /* AmigaDOS FileHandle pointer */
  14.     struct DefaultTracker    *fileTracker;
  15.     struct DefaultTracker    *myTracker;    /* this structure's tracker */
  16.     struct DefaultTracker    *bufTracker;
  17.     UBYTE            *buf;        /* read/write buffer */
  18.     LONG             bufSize;    /* allocated size of buffer */
  19.     LONG             bufLength;    /* number of bytes in buffer */
  20.     LONG             bufPos;    /* read/write position */
  21.     LONG             mode;        /* how file was opened */
  22.     LONG             lastError;    /* last error code encountered */
  23.     LONG             lastPosition;    /* position of last access */
  24.     WORD             endOfFile;    /* used by FRead, FGets */
  25. } ARPFileHandle;
  26.  
  27.     /* Create function prototypes if necessary. */
  28.  
  29. #ifndef _MRARPFILE_PRIVATE
  30.  
  31. char *            FGetsARP(char *s,LONG length,ARPFileHandle *file);
  32. LONG            FPutsARP(char *s,ARPFileHandle *file);
  33. LONG            ReadARPFile(ARPFileHandle *file,APTR buffer,LONG length);
  34. LONG            CloseARPFile(ARPFileHandle *file);
  35. ARPFileHandle *        OpenARPFile(char *name,LONG accessMode,LONG bytes);
  36. LONG            SeekARPFile(ARPFileHandle *file,LONG position,LONG mode);
  37. LONG            WriteARPFile(ARPFileHandle *file,APTR buffer,LONG length);
  38.  
  39. #endif    /* _MRARPFILE_PRIVATE */
  40.  
  41. #endif    /* MRARPFILE_H */
  42.